cmake_minimum_required(VERSION 3.27.0)
project(TrackingAlgo VERSION 1.0.0 LANGUAGES CXX)

set(CXX_STANDARD 17)


# 启动测试
enable_testing()

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
set(Yolov8_Detect_Dir ${CMAKE_SOURCE_DIR}/src/yolov8_detect)
set(Yolov8_Pose_Dir ${CMAKE_SOURCE_DIR}/src/yolov8_pose)
set(Model_Base_Dir ${CMAKE_SOURCE_DIR}/src/model_base)
set(Kalman_Filter_Dir ${CMAKE_SOURCE_DIR}/src/kalman_filter)
set(Bytetrack_Dir ${CMAKE_SOURCE_DIR}/src/bytetrack)


# 第三方库
set(OpenCV_DIR "F:/opencv/opencv_msvc/build/x64/vc15/lib")
find_package(OpenCV REQUIRED)

# 设置 Eigen3 路径
set(EIGEN3_INCLUDE_DIR "F:/opencv/eigen-3.4.0")
list(APPEND CMAKE_MODULE_PATH "${EIGEN3_INCLUDE_DIR}/cmake")
find_package(Eigen3 3.4 REQUIRED)

if(TARGET Eigen3::Eigen)
    message(STATUS "**********Eigen3 found ${EIGEN3_INCLUDE_DIR}************")
endif()




set(ONNXRUNTIME_INCLUDE_Dir ${CMAKE_SOURCE_DIR}/third_party/onnxruntime-win-x64-gpu-1.14.0/include)
# 设置库目录
set(ONNXRUNTIME_LIB_DIR ${CMAKE_SOURCE_DIR}/third_party/onnxruntime-win-x64-gpu-1.14.0/lib)

# 查找所有 .lib 和 .dll 文件
file(GLOB_RECURSE ONNXRUNTIME_LIB "${ONNXRUNTIME_LIB_DIR}/*.lib")
file(GLOB_RECURSE ONNXRUNTIME_DLL "${ONNXRUNTIME_LIB_DIR}/*.dll")
# 合并库文件和动态库文件
list(APPEND ONNXRUNTIME_LIBS ${ONNXRUNTIME_LIB})

add_subdirectory(src)

# 添加测试项目
add_subdirectory(test/yolov8_pose_test)